home *** CD-ROM | disk | FTP | other *** search
/ Toolkit for Duke Nukem 3D / Walnut Creek CDROM - Toolkit for Duke Nukem 3D.iso / tutorial / palette.txt < prev    next >
Text File  |  1995-02-07  |  4KB  |  96 lines

  1.  
  2. ======<<<<<<      JimÆs Mini-FAQ on Duke3D Palette Version 1.0
  3. >>>>>>======
  4.  
  5. AUTHOR: Jim Morley, ZTXJIN@AOL.COM
  6.  
  7. INTRODUCTION:
  8.  
  9. Palettes refer to color groups indexed with a number between 0-25. While some
  10. of these numbers have special use in Duke3d, many are open for
  11. level-designers or code-writers. WeÆll take a look at some.
  12.  
  13. MISSING CODE IN GAME.CON / INTRODUCING "IFSPRITEPAL":
  14.  
  15. The boss from the first episode shows up as a regular player in later
  16. episodes, but acts differently. However, they both use the same sprites, so
  17. how is this done? A close look at the code shows the secret:
  18.  
  19. ifspritepal 0 { } else ... 
  20.  
  21. ItÆs that "ifspritepal" that does the trick. A quick look at the MAP file
  22. shows that the first episode boss has a palette of  "0" while the
  23. "minibosses" of later episodes are set to palette "21". Check out this code:
  24.  
  25. ifcount THAWTIME { ai AIBOSS1SEEKENEMY spritepal 21 }
  26. else ifcount FROZENDRIPTIME { ifactioncount 26 { spawn WATERDRIP
  27. resetactioncount } }
  28.  
  29. Yes, after the miniboss thaws out, and a quick check shows that only the
  30. miniboss can be frozen, heÆs set back to palette 21. In fact this same code
  31. shows up for BOSS2, look under "ifaction ABOSSxFROZEN". Now hereÆs some
  32. homework, 3drealms has all the code for a "mini" BOSS3 to get frozen, but
  33. forgot to put in the thaw code, those two lines above. Your assignment is to
  34. copy those two lines to the correct position, you have two examples in the
  35. BOSS1 and BOSS2 code. Now you can add "mini" BOSS3s to your  levels!
  36.  
  37. ADDING NEW ACTORS THE EASY WAY:
  38.  
  39. If this used anywhere else? Yes, the one other place this kind of code is
  40. used is in the TROOPER section. And once again itÆs palette 21 thatÆs used as
  41. a key to change actions. So what can we do with this? LetÆs add a bunch of
  42. actors! HereÆs how:
  43.  
  44. LetÆs make it simple to start, letÆs give different weapons to different
  45. ranks. We can use code like this:
  46.  
  47. ifspritepal 11 { shoot RPG }
  48. else ifspritepal 12 { shoot FIRELASER }
  49. else ifspritepal 13 { shoot SHOTSPARK1 }
  50. else ifspritepal 14 { shoot SHOTGUN ifrnd 128 shoot MORTER }
  51. else ifspritepal 15 { shoot COOLEXPLOSION1 }
  52. else { shoot SPIT }
  53.  
  54. You get the idea. By the way, thatÆs just about all you can have them shoot
  55. at you. You can come up with all kinds of mixes, though I would suggest
  56. experimenting with one weaker than normal and one strnger than normal. Say
  57. for Pigcops you have Rookie, Street Cop, Swat Team.
  58.  
  59. PALETTE QUICK CHART:
  60.  
  61. Just incase you donÆt have a handy palette chart hereÆs one. Note that the
  62. color blue is used in the clothing and uniforms of chicks and some enimies,
  63. this blue turns different colors. IÆll call this blue "key blue" so you know
  64. what IÆm talking about.
  65.  
  66. Palette - Remarks
  67. 0 - the normal palette
  68. 1 - shades of blue, also used to indicate multiplayer weapons and switches
  69. 2 - shades of red
  70. 3 - no visible effects most of the time - turns off killer BIGORBIT sky
  71. (actuallly many colors do this)
  72. 4 - all black, great for shadows, or how about cloaked enimies?
  73. 5 - nothing visibile
  74. 6 - the night vision look, possible electric monsters?
  75. 7 - weird yellow cast, could be cool effect, like low pressure sodium lights
  76. 8 - shades of green
  77. 9 - not much
  78. 10 - key blue turns red
  79. 11 - key blue turns lt. green
  80. 12 - key blue turns white
  81. 13 - key blue turns grey
  82. 14 - key blue turns drk. green
  83. 15 - key blue turns brown
  84. 16 - key blue turns drk. blue
  85. 17 - blue skin on many actors
  86. 18 - key blue turns grey/white
  87. 19 - red skin on many actors
  88. 20 - blue skin on many actors
  89. 21 - key blue turns bri. red - used for red key/lock and to designate
  90. mini-boss and trooper
  91. 22 - key blue turns green
  92. 23 - key blue turns yellow - used for yellow key/lock
  93. 24 - often stange effects, more blood, etc
  94.  
  95. ======<<<<<<       End      >>>>>>======
  96.